package com.nchuoj.judger.controller;

import com.feign.config.enums.RedisHead;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * TODO
 *
 * @Description
 * @Author ZW
 * @Date 2022/12/29 21:46
 **/
@EnableScheduling
@Configuration
public class TimedDeletion {
    String hostUniqueId;

    RedisTemplate<String,Object> redisTemplate;
    public void  setRedisTemplate(RedisTemplate<String,Object> redisTemplate){
        this.redisTemplate = redisTemplate;
    }
    @Scheduled(cron="0 0 2 * * *")
    public void deletion(){
//        redisTemplate.keys();

    }
}
